package com.activities.api.data.entities;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;

import org.datanucleus.jpa.annotations.Extension;

/**
 * @author glin
 */
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@Entity
@MappedSuperclass
public abstract class Item {
	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Extension(key="gae.encoded-pk", value="true")
	@XmlAttribute
	private String id;
	
	@XmlAttribute
	private Date created;
	
	@XmlAttribute
	private Date modified;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Date getCreated() {
		return created;
	}

	public void setCreated(Date created) {
		this.created = created;
	}

	public Date getModified() {
		return modified;
	}

	public void setModified(Date modified) {
		this.modified = modified;
	}
}
